home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_02_10 / 2n10080a < prev    next >
Text File  |  1991-07-15  |  416b  |  19 lines

  1. /*
  2.  *  MyYield():  process any pending 
  3.  *  messages to the application, 
  4.  *  and return when none in the queue
  5.  */
  6.  
  7. void MyYield()
  8. {
  9. MSG msg;
  10.     while ( PeekMessage( &msg, NULL,
  11.             NULL, NULL, PM_REMOVE ) ) {
  12.         if ( TranslateAccelerator( 
  13.             hMainWnd, hAccTable, &msg) )
  14.             continue;
  15.         TranslateMessage( &msg );
  16.         DispatchMessage( &msg );
  17.         }
  18. }
  19.